Is it appropriate to use categorical data with logit and/or linear regression? If I have data set containing only categorical variables, so variables with only values of 0 and 1, do I violate any assumptions of the logit and standard linear regression if I was to use them? I checked and it doesn't seem to violate anything.
So is it wrong if I just went ahead and estimated a logit regression on two variables x,y in the following way in R?
regression = glm(y~x , family = binomial(logit))
Do I need to specify that x,y are categorical variables, why do I need that if so, aren't they just data?
 A: Given that your response variable y is categorical, it would violate the assumptions of standard linear (OLS) regression, if you were to use that instead of logistic regression.  Specifically, the residuals would not be normally distributed and the residual variance would not be constant (since the variance of a proportion is a function of the proportion itself).  
Regarding logistic regression, the comment by @Glen_b is exactly correct.  You should use logistic regression.  
A: Leaving aside the appropriateness of using a 0-1 variable as the response (dependent variable) in a linear regression (about which see gung's answer):
It makes no difference whether you treat a 0-1 variable as categorical or numeric. 
To make a numeric variable categorical in R, you would as.factor them, and then the dummy for the second level of the factor would replicate the original 0-1 variable. (That's the dummy that will be used in the regression by default, so the fits are the same.)
If we set up some data
 x <- c(0L, 1L, 1L, 0L, 1L, 0L, 1L, 1L, 0L, 0L, 1L, 1L, 0L, 1L)
 y <- c(1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 0L, 0L, 1L)

We can see that these are all equivalent (some lines omitted):
> glm(y~x,family=binomial)    
Coefficients:
(Intercept)            x  
     0.6931       1.2528  

Degrees of Freedom: 13 Total (i.e. Null);  12 Residual
Null Deviance:      14.55 
Residual Deviance: 13.67    AIC: 17.67

$ $
> glm(y~as.factor(x),family=binomial)
Coefficients:
  (Intercept)  as.factor(x)1  
       0.6931         1.2528  

Degrees of Freedom: 13 Total (i.e. Null);  12 Residual
Null Deviance:      14.55 
Residual Deviance: 13.67    AIC: 17.67

$ $
> glm(as.factor(y)~as.factor(x),family=binomial)
Coefficients:
  (Intercept)  as.factor(x)1  
       0.6931         1.2528  

Degrees of Freedom: 13 Total (i.e. Null);  12 Residual
Null Deviance:      14.55 
Residual Deviance: 13.67    AIC: 17.67

Similarly, it makes no difference with linear regression except that if you try to have a factor as the response in a linear regression in R, it will generate some warnings. The estimates - and so the fit - are the same in each case.
