how to interface HCPL-3700 optocoupler to an input pin of ATmega16L
The datasheet should have been a lot more clear on this. The only relevant information on the output pull-up I could find was on page 3: 


  Logic low output voltage = 0.4 V maximum, at 4.2 mA
  Logic high output current = 100 \$\mu\$A maximum  


That last value must be the off-leakage current, but it's very high. It would mean that a 1 k&Omega; pull-up resistor would drop 100 mV, a 10 k&Omega; would give an unacceptable 1 V drop. I would stick to 1 k&Omega;.  

For the input resistors you need figure 8 of the datasheet.  



This shows the threshold values for the input voltage hysteresis as a function of series resistance. For instance, at 40 k&Omega; the levels are 50 V and 100 V. That means the output goes low if 100 V is exceeded, and high again if the input voltage goes below 50 V. At 230 V AC the output will be low between 18° and 171° of a half cycle, that's a 85 % duty cycle.