The increasing adoption of home and transport electrification has significantly increased the overall electricity consumption, leading to larger uncertainties in energy scheduling and management. Accurate electricity forecasting is crucial for energy management and efficiency. Traditional electricity consumption forecasting methods mainly focus on building either a separate model for each customer or a single model for all customers, which may lead to low accuracy as they often fail to capture shared electricity usage patterns among forecasting problems. In this study, we propose a temporal and cross-task co-learning (TCTCL) framework to simultaneously predict the electricity consumption of a large number of customers. TCTCL integrates both temporal representation learning (TRL) and cross-task representation learning (CTRL). As electricity consumption forecasting is inherently data-driven, TCTCL is flexible and can accommodate various deep learning based predictors depending on the specific scenario. Considering the promising performance of the recurrent neural network (RNN), we employ it as the predictor for all tasks in this study. TRL involves training an independent RNN model for each task (e.g., customer or a group of customers), ensuring each model is specialized for its respective task. CTRL enhances forecasting accuracy by capturing cross-task patterns through sharing and reusing model information across customers, i.e., transferring RNN architectures of source tasks to the target forecasting task. The amount of RNN model information from source tasks reused for each target task is regulated by knowledge coefficients, which are optimized by a designed gradient descent-based approach, making it applicable to large-scale electricity consumption networks. The superiority of TCTCL is demonstrated by comparison with several state-of-the-art time series models. We further validate the scalability and applicability of TCTCL on a large-scale power system consisting of 217 customers by integrating it with clustering techniques.