"What's going on?" vs. "What's happening?"

Yes, they can. But consider this difference:

"What's going on?" can also be accusatory, as in "What's going on here? I didn't give permission for you to have a party in my house!"

"What's happening?" ranges from innocuous to friendly. It's a "defanged" version of "What's going on?" But most of the time, the latter statement is innocuous as well.