Scalloped potatoes seem like a simple, homey dish, but there are a few things that can go wrong. If you notice a watery sauce with bits of whey, the sauce has curdled or broken. Although there's no reason why you can't eat this dish, it's not very appetizing. You might be able to fix the curdled sauce, but in the future, change your tactics to prevent curdling.
The curdling that you notice probably occurred because the temperature was too hot, causing the proteins in the milk to separate. It's perfectly safe to eat the scalloped potatoes and the curdled cream. Still, the dish won't have its characteristic creaminess and it might have a watery, slightly tangy flavor.
It would be a shame to throw out a pan of scalloped potatoes because the sauce curdled. Go ahead and serve it but disguise it. Pour a little more heavy cream over the potatoes and curdled sauce. Add some grated cheese to the top and bake on a low temperature for an additional 10 minutes or so. As the cream combines with the curdled sauce, it can sometimes restore it or at least reduce the damage.
In the future, try baking scalloped potatoes at a lower temperature so the sauce doesn't simmer or boil. You might need to pre-cook the potatoes slightly or cut them very thinly so they cook adequately at the lower temperature. Bake the dish just until the potatoes are tender and the cheese is golden brown. Also make a white sauce -- the traditional method for making scalloped potatoes -- by cooking flour and butter over medium heat to make a roux. Stir in milk or half and half and cook it until it thickens, but don't allow it to boil vigorously. At this point, you can add the cheese and pour the sauce over the potatoes before putting it in the oven.
The ingredients you use can also reduce the risk of curdling. Whole-fat dairy products, such as heavy whipping cream, are less likely to curdle than low-fat product. They also taste better in a creamy dish such as scalloped potatoes. The starch in some potatoes, such as russets, leaches into the cream, which can stabilize it and prevent curdling, and the fresher the cream or milk is, the less chance of curdling. Also, wait to salt potatoes until after the dish has cooked because salt can sometimes encourage curdling.