Question: What does "school lunch" mean in American English? Is it ambiguous between a lunch provided by a school and a lunch prepared at home like a bag lunch?

Answer: 
A school lunch can either be:

* a lunch prepared and served in the school cafeteria, or
* a lunch prepared at home and taken to school to be eaten there.

When I hear the term "school lunch," I typically think of the former meaning first. However, as was stated in a comment by @userr2684291, the latter meaning is still valid. (Just because a phrase **usually** means one thing doesn't mean it **never** means another.) Here are a couple quotes that use the term in this way:

> 
> *When I was in the second grade, my mom packed my school lunch every day in a brown paper bag*. (Aegina Angeliades, *My Skin Don't Fit*, 2014)
> 
> 
> *If you need fresh ideas for making healthy school lunches, leftovers can save the day*. ([VegKitchen website](http://www.vegkitchen.com/recipes/leftover-heaven-ideas-for-school-and-brown-bag-lunches/))
> 
> 
> 

---

As a footnote, you should remember that any two-word term like "school lunch" may have more than one meaning. Moreover, when you say "in American English," you should know that [**regionalisms** may and often do apply](https://en.wikipedia.org/wiki/Regional_vocabularies_of_American_English#Regionalisms). 

*Hotdish and a frappe for lunch, anyone?*
To add on to the other answers: "School lunch" is ambiguous. It could be provided by the school for the midday meal, or one that you bring with you to eat at school. Without context, you don't know for sure which is meant, or even if there is any relevant difference.

In addition, "school lunch" (commonly "lunchtime") can also be the *time period* during which students normally eat the midday meal, and then go play or talk or whatever else they are permitted to do during that break time. Example:

> 
> Mister Potter. As you have been told, **school lunch** is for eating or playing with your friends. It is not for drawing magic circles and transforming your fellow students into newts. We are not that kind of school.
> 
> 
> 

Again, context is important to understand which is meant.