How to estimate parameters in a utility function? Utility function is $U = X^aY^b$.

It is a Cobb-Douglas function, and there are data for $X$ and $Y$.

I would like to know how to estimate $a$ and $b$.
as @ts_highbury mentioned above you can take the natural logarithm on both sides of Cobb-Douglas equation $$\ln(U) =a\ln(X)+b\ln(Y)$$ after that "obviously" you can notice the equation became linear in parameters (i.e linear equation), so you can use a various types of estimation methods but most famous also easy one is the Least squares method.

P.S: be careful in interpreting the results after taking the natural logarithm or you can just take the exponentiation on both side of the linear Cobb-Douglas equation (after taking natural logarithm) and you will have the original form of Cobb-Douglas equation.