Error using sp_send_dbmail with a @query parameter
Going an entirely different direction than what I was thinking of in the comments, if you're running this from within a job, this blog post suggests adding the SQL Agent account to the sysadmin fixed server role.

I doubt you have to go that far to fix this, and I suspect you only really need to grant the SQL Agent user (or whatever user owns the job in question) a minimum set of permissions, which are execute permissions on the sp_send_dbmail procedure, ensuring it's a member of the DatabaseMailUser database role in the msdb database, and finally, making sure it can access the data being returned by the query you're passing to the sp_send_dbmail routine itself.