Is it appropriate to use state or time fixed effects in a difference-in-differences model? I am running a regression which analyzes the effects of a state level policy on crime rates in America. I am using the difference-in-differences estimator and I'm not sure whether I can still add fixed effects into the model. I have a couple of control variables as well but I do not know whether including state or time fixed effects would be appropriate when using the difference-in-differences estimator. Also, I am confused as to how to add these fixed effects and what fixed effects to use in Stata.
 A: 
I am using the difference-in-differences estimator and I'm not sure whether I can still add fixed effects into the model.

Of course you can.
If the policy is adopted by treated states at the same time then you can estimate your model more simply as the interaction of a treatment/control dummy with a pre-/post-policy indicator. However, it's rare to observe states adopt crime initiatives uniformly. Thus, the rest of my answer assumes the 'roll out' of the policy is staggered over time.

I have a couple of control variables as well but I do not know whether including state or time fixed effects would be appropriate when using the difference-in-differences estimator.

It's very appropriate.
And you must include state and time (e.g., month, quarter, year, etc.) fixed effects, in addition to your policy variable(s).

I am confused as to how to add these fixed effects and what fixed effects to use in Stata.

Well, this is a bit off-topic. It's a general programming question. Again, you must use unit and time fixed effects. For example, suppose you acquired state level auto theft rates across all 50 states over the last ten years. Simply regress the auto theft rate on state fixed effects, year fixed effects, and the policy indicator (i.e., 'turns on' if a state $s$ adopts and is in the years $t$ when the policy is actually in effect, 0 otherwise). Once you xtset your data, then the basic structure is as follows:
xtset state year
xtreg crime policy other_covariates i.year, fe cluster(state)

where crime is a crime measure of interest and policy is the dichotomous treatment variable. The other_covariates is standing in for any other time-varying covariates at the state level.
