The global COVID-19 pandemic has prompted an urgent move to digital learning in higher education. The most advanced higher education institutions all over the world are likely to have struggled to transition from face-to-face to online teaching and learning. In this sense, both students and teachers have had a hard time shifting to virtual classrooms. The present study aimed at developing student teachers' EFL writing skills and their writing self-efficacy using a program based on situated language learning and virtual task activities. To achieve this goal, about 70 participants enrolled in the second-year English Section at the Faculty of Education, Benha University, were randomly assigned into two groups: a control group (N= 35) and an experimental group (N= 35). The participants of the experimental group received a traditional lecture-based writing course, while the participants of the experimental group studied via virtual classes. The present study adopted a mixed research methodology; it combined both quantitative and qualitative methods of data collection and analysis. The instruments of the study included an EFL writing skills test, an EFL writing skills checklist, a writing self-efficacy scale, and a semi-structured interview. Results revealed that the program based on situated language learning and virtual task activities was effective in developing participants' EFL writing skills and their writing self-efficacy. Based on those findings, the study recommended that a program based on situated language learning and virtual task activities should be integrated into writing instruction programs. The study also recommended holding educational courses and workshops for teachers in general and English teachers in particular to employ virtual classroom learning in order to enrich the teaching-learning process and develop EFL students' writing performance.