Nice answer from Oleg Dok.
To expand upon his answer, here's a stored procedure that accepts a year and generates all of the dates for the year. This takes into account leap years.
CREATE PROCEDURE GenerateDates (@Year INT)
AS
SET NOCOUNT ON
DECLARE @FirstDate DATETIME
DECLARE @NoOfDates INT
SET @FirstDate = DateAdd(Year, @Year-1900, 0)
IF MONTH(DATEADD(Day, 59, @FirstDate))=3
SET @NoOfDates = 365
ELSE
SET @NoOfDates = 366
INSERT INTO DateTimeRange([Date])
SELECT DATEADD(day, Number, @FirstDate)
FROM master..spt_values
WHERE Number < @NoOfDates AND type = 'P'
One proviso. I believe that "spt_values" may not be supported and may be removed in future versions of SQL Server. However, I have read that it is being used in SQL Server 11 example code so perhaps it's not a worry just yet.