WASHINGTON—Tax receipts surged in April to generate the largest monthly U.S. budget surplus in seven years, the latest sign that climbing stock values, hefty corporate profits and rising incomes for wealthier Americans are improving the nation’s budget picture.

The U.S. Treasury collected a record $472 billion last month, up 14% from a year earlier, leading to a $157 billion surplus for the month. While the U.S. typically enjoys a surplus in April due to tax-filing season, this year’s surplus was $50 billion more than last...